package dynamic;

import dynamic.metadata.DTableFieldInfo;
import dynamic.metadata.EntityClass;
import dynamic.metadata.EntityProperty;

import java.util.HashMap;

public class DynamicEntityImpl extends HashMap implements DynamicEntity  {

    private EntityClass entityClass;
    public DynamicEntityImpl() {
             System.out.println("init DynamicEntityImpl");
    }
    @Override
    public EntityClass getEntityClass() {
        return entityClass;
    }

    @Override
    public Object get(EntityProperty entityProperty) {
        return this.get(entityProperty.getPropertyName());
    }

    @Override
    public Object get(DTableFieldInfo entityProperty) {
        return this.get(entityProperty.getProperty());
    }

    public void setEntityClass(EntityClass entityClass) {
        this.entityClass = entityClass;
    }
}
